import { AntDesignVueResolver } from "unplugin-vue-components/resolvers";
import Components from "unplugin-vue-components/vite";

// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
  modules: ["@pinia/nuxt", "@pinia-plugin-persistedstate/nuxt"],
  compatibilityDate: "2025-07-15",
  devtools: { enabled: true },
  vite: {
    plugins: [
      Components({
        resolvers: [
          AntDesignVueResolver({
            importStyle: "less",
          }),
        ],
      }),
    ],
    css: {
      preprocessorOptions: {
        less: {
          /* modifyVars: {
            "primary-color": "#ea6f5a",
          }, */
          additionalData: '@import "@/asstes/antd-custom.less";',
          javascriptEnabled: true,
        },
      },
    },
    ssr: {
      noExternal: ["ant-design-vue"],
    },
  },
});
